# https://www.luogu.com.cn/problem/P1152

lst=readline.split(' ').map(&:to_i)
N=lst.shift
lst2=lst.clone
lst2.shift
lst3=Array.new(lst2.size) {|i| i=(lst2[i]-lst[i]).abs}
lst3.sort!
if(lst3 == (1..N-1).to_a)
	puts "Jolly"
else
	puts "Not jolly"
end

